Part Number Hot Search : 
00HSTS 220CA W25P010 FVTO20IV MMSZ4702 P4SMA13A SIR460DP 2SA1572
Product Description
Full Text Search
 

To Download PMODJSTK Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  p p m m o o d d j j s s t t k k ? ? r r e e f f e e r r e e n n c c e e m m a a n n u u a a l l ? ww w. d ig i l en t inc .c om revision: september 22, 2008 note: this document applies to rev c of the board. 215 e main suite d | pullman, wa 99163 (509) 334 6306 voice and fax doc: 502-116 page 1 of 3 copyright digilent, inc. all rights reserved. other product and company names mentioned may be tradema rks of their respective owners. overview the PMODJSTK was designed to be a versatile user interface that can be used in a wide variety of projects. it contains a resistive twin axis joystick that includes a center push button along with two additional push buttons. also, PMODJSTK has two programmable leds located on the board that can provide additional information to the user. the PMODJSTK is ideally suited for digilent microcontroller or fpga based projects that required proportional control from the user, such as robotic applications. functional description the joystick, located on the PMODJSTK, contains two potentiometers which are manipulated by moving the joystick in the x and y directions. the PMODJSTK is equipped with an embedded atmel? attiny24 microcontroller in a mlf20 package. this microcontroller utilizes an analog to digital converter to measure the voltage occurring on the sweeper pins of each of the two potentiometers. the voltage occurring at these sweeper pins ranges from ground potential to vcc depending on the position of the joystick. a button is also attached to the joystick and is activated by pressing down directly on the joystick. the joystick?s center button, along with the two additional push buttons, is read by the microcontroller. the microcontroller assembles the joystick?s positional data, along with the status of the push buttons, in a series of five bytes. it provides a 10-bit value for each axis of the joystick. the joystick?s axis values are each placed in 16-bit values, which are made up of an upper byte and a lower byte. figure 1 PMODJSTK circuit diagram figure 2 joystick axis map
digilent, inc. PMODJSTK reference manual www.digilentinc.com copyright digilent, inc. page 2 of 3 the two least significant bits of the upper byte, along with the entire lower byte, make up the 10-bit value that was calculated. by referring to the joystick axis map located above, it is possible to know what x and y values to expect from the PMODJSTK, based on the current position of the joystick. the x and y position data make up the first four bytes of the five byte series. the last byte contains the positions of the three buttons, indicated by the three least significant bits in the byte. communication the serial peripheral interface (spi) mode 0 method of communication is used to communicate between the PMODJSTK and the master board to receive data from the PMODJSTK using spi, a byte must be shifted into the PMODJSTK. as the byte is shifted into the PMODJSTK, it shifts out a data byte to the master. this communication is accomplished via the master-in slave-out (miso) and master- out slave-in (mosi) lines of the communication bus. this communication must be synchronously clocked using the serial clock (sck) line of the communication bus. the PMODJSTK is enabled on the spi bus by lowering the slave select (ss) pin. the ss pin is active low. the maximum recommended spi clock speed is 1 mhz. the minimum recommended amount of time between the ss pin going low and the start of data transmission on the bus is 15 s. the minimum recommended amount of time between the end of one byte being shifted and the beginning of the next is 10 s. the ss pin should be returned high after communication has been completed. after lowering the ss pin, the master should shift 5 bytes to the PMODJSTK in order to receive data from the PMODJSTK. after each of these bytes is shifted in, the master will have received a byte of data from the PMODJSTK. the two programmable leds located on the PMODJSTK are turned on or off based on the status of the first of the five bytes shifted into the PMODJSTK. the two least significant bits of the first byte determine the status of the leds. for example, if the first byte shifted into the PMODJSTK is 0b00 (0x00), then both leds will be off. if the first byte is 0b01 (0x01), onl y led1 will be on and similarly if 0b10 (0x02) is shifted in, then only led2 will be on. both will be turned on if 0b11 (0x03) is shifted in as the first byte. write to the leds using the following format: figure 3 led command the remaining four bytes that are shifted in are ignored by the PMODJSTK. after each byte has been completely shifted in, the PMODJSTK will have finished shifting out a byte of data to the master. the order of the bytes being transferred from the PMODJSTK to the master is as follows: 1 2 3 4 5 x (low) x(high) y (low) y(high) buttons the buttons are reported in the last byte in the following format: figure 4 byte 5 a bit written to a ?1? indicates that the corresponding button is being depressed, and a ?0? indicates that it is not being depressed.
digilent, inc. PMODJSTK reference manual www.digilentinc.com copyright digilent, inc. page 3 of 3 header description pin function ports j1 spi and 1 ss pa7 in-system 2 mosi pa6 programming 3 miso pa5 4 sck pa4 5 gnd 6 vcc figure 5 header pins to attiny24 ports/bit


▲Up To Search▲   

 
Price & Availability of PMODJSTK

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X